package com.ming.study.utils;

public enum ResultCodeImpl implements ResultCode{
    SUCCESS(0, "成功"),
    ERROR(20001, "失败"),
    ERROR_NETWORK(20002, "网络异常"),
    ERROR_UN_KNOW(20003, "未知错误"),
    RUNNING (20005, "运行中"),
    NOT_LOGIN(26000, "未登录"),
    ERROR_LOGIN_OVERTIME(26001, "登录过期"),

    // 软件错误
    ERROR_REDIS(22000, "redis错误"),

    // 表单数据错误
    // 登录
    ERROR_LOGIN_PARAM_LACK(27000, "账号或密码不能为空"),
    ERROR_LOGIN_USER_NOT_FOUND(27001, "账号或密码错误"),

    // 教务网错误
    ERROR_JW_SLOW(28000, "教务网网络过慢"),
    ERROR_ANALYSIS(2900, "教务网解析错误");

    private int code;
    private String message;

    ResultCodeImpl( int code ,String message){
        this.code = code;
        this.message = message;
    };

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
